import { createRouter, createWebHistory } from 'vue-router'
import AdminLayout from '@/layouts/AdminLayout.vue'
import DashboardView from '@/views/DashboardView.vue' // 单文件控制 tab

export default createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      redirect: '/dashboard/overview'
    },
    {
      path: '/dashboard',
      component: AdminLayout,
      children: [
        { path: ':tab(overview|workbench|analysis)?', name: 'dashboard', component: DashboardView }
      ]
    },
    // 其余一级路由...
  ]
})